﻿using System.Threading.Tasks;

using Windows.ApplicationModel.Activation;

using SeriesManager.API;
using SeriesManager.Model;

namespace SeriesManager.ViewModel
{
    public sealed class SplashViewModel
    {
        public async Task DoWork()
        {
            await AppX.Instance.API.Clear();

            var seriesCol = await AppX.Instance.API.Load(AppX.Instance.Language);

            foreach (var series in seriesCol)
            {
                AppX.Instance.Series.Add(series);
            }
        }
    }
}